using WeatherSystem.API.Models;

namespace WeatherSystem.API.CQRS.Commands
{
    /// <summary>
    /// 创建天气数据命令
    /// </summary>
    public class CreateWeatherDataCommand : ICommand<Guid>
    {
        public Guid CityId { get; set; }
        public DateTime RecordedAt { get; set; }
        public string Source { get; set; } = "Manual";
        public Dictionary<string, object>? Metrics { get; set; }
    }

    /// <summary>
    /// 批量创建天气数据命令
    /// </summary>
    public class CreateWeatherDataBatchCommand : ICommand<List<Guid>>
    {
        public List<CreateWeatherDataCommand> WeatherDataList { get; set; } = new();
    }

    /// <summary>
    /// 更新天气数据命令
    /// </summary>
    public class UpdateWeatherDataCommand : ICommand<bool>
    {
        public Guid Id { get; set; }
        public Guid? CityId { get; set; }
        public DateTime? RecordedAt { get; set; }
        public string? Source { get; set; }
        public Dictionary<string, object>? Metrics { get; set; }
    }

    /// <summary>
    /// 删除天气数据命令
    /// </summary>
    public class DeleteWeatherDataCommand : ICommand<bool>
    {
        public Guid Id { get; set; }
    }

    /// <summary>
    /// 采集天气数据命令
    /// </summary>
    public class CollectWeatherDataCommand : ICommand<WeatherDataEntry>
    {
        public Guid CityId { get; set; }
    }

    /// <summary>
    /// 模拟天气数据生成命令
    /// </summary>
    public class SimulateWeatherDataCommand : ICommand<SimulateWeatherDataResult>
    {
        public double BaseTemperature { get; set; } = 20.0;
        public int Count { get; set; } = 1;
    }

    /// <summary>
    /// 模拟天气数据生成结果
    /// </summary>
    public class SimulateWeatherDataResult
    {
        public int CityCount { get; set; }
        public int TotalDataGenerated { get; set; }
        public double BaseTemperature { get; set; }
        public int CountPerCity { get; set; }
        public List<object> Cities { get; set; } = new();
    }
}